<template>
	<view>
		<scroll-view scroll-x class="bg-white nav" scroll-with-animation :scroll-left="scrollLeft">
			<view class="cu-item tab" :class="index==TabCur?'co cur':''" v-for="(item,index) in arr" :key="index" @tap="tabSelect" :data-id="index">
				{{item}}
			</view>
		</scroll-view>
		<map style="width: 100%; height: 600rpx;" :latitude="latitude" :longitude="longitude" :markers="covers"></map>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				TabCur: 0,
				scrollLeft: 0,
				arr:['到店签到','到场签到','销售动态']
			}
		},
		methods: {
			tabSelect(e) {
				this.TabCur = e.currentTarget.dataset.id;
				this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
			}
		}
	}
</script>

<style>
	.co{
		color: #3AABE6;
	}
	.tab{
		width: 30%;
		text-align: center;
	}
</style>
